
#ifndef __MEDIA_PLAYER_QUICK_SORT_H_
#define __MEDIA_PLAYER_QUICK_SORT_H_


#define GLUE_NODES_TOTAL 1024
#define Q_SORT_THRESHOLD 12

struct glue_node
{
	struct list_head *p_first;
	struct list_head *p_last;
	struct list_head t_cross;
};

struct CompareParameter
{
	void *context;
	int (*compare)(struct list_head *, struct list_head *, struct CompareParameter *);
};

static int quick_sort_init_gnode(void);
static void quick_sort_destroy_gnode(void);
static int quick_sort_get_gnode(struct list_head *, struct list_head *);
static int quick_sort_put_gnode(struct list_head **, struct list_head **);
static void quick_sort_insertion_sort(struct list_head *, struct list_head *, struct CompareParameter *);

#endif
